<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
#{extends 'main.html' /}
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Question and Replies</title>
</head>
<body>

	<!-- Ghada Kades viewing a question with the replies on it 
	with displaying the names of the repliers and the dates   -->

	<table border="0">
		<tr>
			<td colspan="2" style="background-color: #FFA500;">
				<h1>
					<a href="/Application/othersProfile?viewOthers=${asker.id}">${asker.name}</a>:
					${question.questionContent}
				</h1>
			</td>
		</tr>
		<tr valign="top">
			<td style="background-color: #778899; width: 200px; text-align: top;">
				#{list items:repliers,as:'replier'}
				<ul>
					<h2>
						<a href="/Application/othersProfile?viewOthers=${replier.id}">${replier.name}</a>
					</h2>
				</ul> <br> #{/list}
			</td>
			<td
				style="background-color: #eeeeee; height: 200px; width: 1000px; text-align: top;">

				#{list items:replies, as:'reply'}
				<h2>${reply.replyContent}</h2>
				<h6>${reply.replyDate}</h6>
				<form action="@{Guidance.repliesPage()}" method="GET">
					<div id="${reply.id}"></div>
				</form> #{/list}
			</td>
		</tr>

	</table>

	<!-- end Ghada Kades -->


	<!-- (call method addReplyToQuestionToDatabase() from controller when clicked on submit)
		@ autor shayma  -->

	<!-- Shayma -->

	<form action="@{Guidance.addReplyToQuestion()}" method="get">
		<span>#{error ' replyContent' /}</span><br> <input type="hidden"
			name="questionId" id="questionId" value="${question.id}" /> Reply: <input
			type="text" name="replyContent" id="replyContent" row="2" /><br />
		<input type="submit" value="Post">

	</form>


	<!-- end Shayma -->


</body>
</html>